<?php
$v_staff_id = $_SESSION['staff_id'];
?>
<!-- Table chua menu cua application-->
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="top_menu_table">
	<tr><?php
		if ((onegate_is_receiver_for_recordtype_net($v_staff_id,0,$_SESSION["recordtype"]) )
		 	||(_is_on_menu(_CONST_ONEGATE_RECORD_VIEW,$_SESSION['onegate_public_function_list'],$_SESSION['onegate_granted_function_list']))
		){?>
		<td align="left" id="td_approving_net">
			<a href="<?php echo $_ISA_WEB_SITE_PATH;?>record/approving-net/index.php" ><?php echo _CONST_TOP_MENU_RECORD_CUSTOMER; ?></a>
		</td><?php
		}if ((onegate_is_receiver_for_recordtype($v_staff_id,0,$_SESSION["recordtype"]) )
		 	||(_is_on_menu(_CONST_ONEGATE_RECORD_VIEW,$_SESSION['onegate_public_function_list'],$_SESSION['onegate_granted_function_list']))
		){?>
			<td align="left" id="td_receive_result">
				<a href="<?php echo $_ISA_WEB_SITE_PATH;?>record/receive/index.php" ><?php echo _CONST_TOP_MENU_RECORD_RECEIVE_RESULT; ?></a>
			</td><?php
		}if ((onegate_is_handler_for_recordtype($v_staff_id,0,$_SESSION["recordtype"])) ||(_is_on_menu(_CONST_ONEGATE_RECORD_VIEW,$_SESSION['onegate_public_function_list'],$_SESSION['onegate_granted_function_list']))
		){?>
			<td align="left" id="td_handle">
				<a href="<?php echo $_ISA_WEB_SITE_PATH;?>record/handle/index.php" ><?php echo _CONST_TOP_MENU_RECORD_HANDLE; ?></a>
			</td><?php
		}if ( (onegate_is_handler_leader_for_recordtype($v_staff_id,0,$_SESSION["recordtype"]))
			||(onegate_is_approve_leader_for_recordtype($v_staff_id,0,$_SESSION["recordtype"]))
			||(onegate_is_handler_leader_first_time_for_recordtype($v_staff_id,0,$_SESSION["recordtype"]))
			) {?>
			<td align="left" id="td_approve">
				<a href="<?php echo $_ISA_WEB_SITE_PATH;?>record/approving/index.php?fuseaction=DISPLAY_ALL_RECORD_FOR_APPROVING" ><?php echo _CONST_TOP_MENU_RECORD_APPROVING; ?></a>
			</td><?php
		}?>
			<td align="left" id="td_archives">
				<a href="<?php echo $_ISA_WEB_SITE_PATH;?>record/archives/index.php?fuseaction=DISPLAY_ALL_RECORD_ARCHIVES" ><?php echo _CONST_TOP_MENU_RECORD_ARCHIVES; ?></a>
			</td>
			<td align="left" id="td_report">
				<a href="<?php echo $_ISA_WEB_SITE_PATH;?>report/index.php" ><?php echo _CONST_TOP_MENU_REPORT; ?></a>
			</td><?php
		if (_is_on_menu(_CONST_ONEGATE_QA,$_SESSION['onegate_public_modul_list'],$_SESSION['onegate_granted_modul_list'])
		  ||_is_on_menu(_CONST_LIST_ANSWERER_QA,$_SESSION['onegate_public_modul_list'],$_SESSION['onegate_granted_modul_list'])
		  ||_is_on_menu(_CONST_LIST_APPROVER_QA,$_SESSION['onegate_public_modul_list'],$_SESSION['onegate_granted_modul_list'])){?>
			<td align="left" id="td_qa">
				<a href="<?php echo $_ISA_WEB_SITE_PATH;?>qa/index.php" ><?php echo _CONST_TOP_MENU_QA; ?></a>
			</td><?php
		}
		if ((_is_on_menu(_CONST_LIST_CATE,$_SESSION['onegate_public_modul_list'],$_SESSION['onegate_granted_modul_list']))
		|| (_is_on_menu(_CONST_ONEGATE_LISTTYPE,$_SESSION['onegate_public_modul_list'],$_SESSION['onegate_granted_modul_list']))
		|| (_is_on_menu(_CONST_ONEGATE_LIST,$_SESSION['onegate_public_modul_list'],$_SESSION['onegate_granted_modul_list']))
		|| (_is_on_menu(_CONST_ONEGATE_RECORDTYPE,$_SESSION['onegate_public_modul_list'],$_SESSION['onegate_granted_modul_list']))
		|| (_is_on_menu(_CONST_ONEGATE_WORKTYPE,$_SESSION['onegate_public_modul_list'],$_SESSION['onegate_granted_modul_list']))
		|| (_is_on_menu(_CONST_ONEGATE_REPORTTYPE,$_SESSION['onegate_public_modul_list'],$_SESSION['onegate_granted_modul_list']))
		){?>
			<!--begin - nieuvv - 110608 - them link tim nhanh-->
			<td align="left" id="td_search">
				<a href="<?php echo $_ISA_WEB_SITE_PATH;?>search/index.php"><?php echo _CONST_TOP_MENU_SEARCH; ?></a>
			</td>
			<!--the end nieuvv 110608-->
			<td align="left" id="td_list">
				<a href="<?php echo $_ISA_WEB_SITE_PATH;?>list/recordtype/index.php"><?php echo _CONST_TOP_MENU_LIST; ?></a>
			</td>
			<td align="left" id="td_list">
				<a href="<?php echo $_ISA_WEB_SITE_PATH;?>logininfo/index.php"><?php echo _CONST_TOP_MENU_LOGIN; ?></a>
			</td>
			<?php
		}?>
			<td align="left" id="td_front_end" style="display:none">
				<a href="<?php echo $_ISA_WEB_SITE_PATH;?>front-end/index.php"><?php echo _CONST_TOP_MENU_FRONT_END; ?></a>
			</td><?php
		?>
		<td  align="left" id="td_help">
			<a href="<?php echo $_ISA_WEB_SITE_PATH;?>help/index.htm" target="_blank"><?php echo _CONST_TOP_MENU_HELP; ?></a>
		</td>
		<!--
		<td  align="left" id="td_system">
			<a href="<?php echo $_ISA_WEB_SITE_PATH;?>replication/index.php" ><?php echo _CONST_TOP_MENU_SYSTEM; ?></a>
		</td>		
		<td  align="left" id="td_user">
			<a href="<?php echo $_ISA_USER_WEB_SITE_PATH;?>application/index.php" ><?php echo _CONST_TOP_MENU_ONEGATE_USER; ?></a>
		</td>!--><?php
		//Nut thoat
		if($_FRONT_END_MODE <>1){?>		
			<td align="left">
				<a href="<?php echo $_ISA_WEB_SITE_PATH;?>re_login.php" ><?php echo _CONST_TOP_MENU_LOGOUT;?></a>
			</td><?
		}?>
	</tr>
</table>
